/* Layout for search container */

.search {

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.js .search {
	position: fixed;
	z-index: 1000;
	top: 0;
	left: 0;
	overflow: hidden;
	width: 100%;
	height: 50vh;
}

.btn--search-close {
	font-size: 2em;
	position: absolute;
	top: 1.25em;
	right: 1.25em;
	display: none;
}

.js .btn--search-close {
	display: block;
}

.search__form {
	margin: 5em 0;
}

.search__input {
	font-family: inherit;
	font-size: 2em;
	line-height: 1;
	display: inline-block;
	box-sizing: border-box;
	width: 100%;
	max-width: 900px;
	padding: 0 0 0.1em 0;
	color: #ffefb9;
	border-bottom: 4px solid;
}

.search__input::-webkit-input-placeholder {
	opacity: 0.1;
	/* WebKit, Blink, Edge */
	color: #fff;
}

.search__input::-moz-placeholder {
	opacity: 0.1;
	/* Mozilla Firefox 19+ */
	color: #fff;
}

.search__input:-ms-input-placeholder {
	opacity: 0.1;
	/* Internet Explorer 10-11 */
	color: #fff;
}

.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.search__input::-ms-clear {
	display: none;
}

.search__info {
	font-size: 90%;
	font-weight: bold;
	display: block;
	width: 75%;
	margin: 0 auto;
	padding: 0.85em 0;
	text-align: right;
}

/************************/
/* Transitions 			*/
/************************/

.js .main-wrap {
	transform: perspective(1000px);
	transition: transform 0.6s;
	transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}

.js .main-wrap--move {
	transform: perspective(1000px) translate3d(0,50vh,0) rotate3d(1,0,0,30deg);
}

.js .search {
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.6s;
}

.js .search--open {
	pointer-events: auto;
	opacity: 1;
}

/* Close button */
.btn--search-close {
	opacity: 0;
	transform: scale3d(0.8, 0.8, 1);
	transition: opacity 0.6s, transform 0.6s;
	transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}

.search--open .btn--search-close {
	opacity: 1;
	transform: scale3d(1, 1, 1);
}

/* Search form with input and description */
.js .search__form {
	opacity: 0;
	transform: scale3d(0.7, 0.7, 1);
	transition: opacity 0.6s, transform 0.6s;
	transition-timing-function: cubic-bezier(0.2,1,0.3,1);
}

.js .search--open .search__form {
	opacity: 1;
	transform: scale3d(1, 1, 1);
}

@media screen and (max-width: 40em) {
	.btn--search-close {
		font-size: 1.25em;
	}
}
